import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'

import Index from './views/Index'
import Kind from './views/Kind'
import My from './views/My'
import Order from './views/Order'
import NotFound from './views/NotFound'

import English from './views/second/English'
import Math from './views/second/Math'
import Pe from './views/second/Pe'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/my'
  },
  {
    path:'*',
    component: NotFound
  },
  {
    path:`/index`,
    name:`Index`,
    component: Index,
    children:[
      {
        path:'english',
        component:English,
      },
      {
        path:'math',
        component:Math,
      },
      {
        path:'pe',
        component:Pe,
      },
  ]
  },
  {
    path:`/kind`,
    name:`Kind`,
    component: Kind
  },
  {
    path:`/order`,
    name:`Order`,
    component: Order
  },
  {
    path:`/my`,
    name:`My`,
    component: My
  },
]

const router = new VueRouter({
  routes
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
